<template>
  <el-form>
    <el-form-item label="测量模式">
      <el-select v-model="form.measureMode" type="number">
        <el-option
          v-for="item in measureModeList"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="极化方式">
      <el-select v-model="form.polarType" type="number">
        <el-option
          v-for="item in polarizationModeList"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="检波方式">
      <el-select v-model="form.detectionMode" type="number">
        <el-option
          v-for="item in detectionModeList"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="检波速度">
      <el-input v-model="form.detectionSpeed" type="number" />
    </el-form-item>
    <el-form-item label="衰减模式">
      <el-select v-model="form.attenuationMode" type="number">
        <el-option
          v-for="item in incDecModeList"
          :key="item.value"
          :value="item.value"
          :label="item.label"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="衰减值">
      <el-input v-model="form.attenuationValue" type="number">
        <template #append>
          <span class="pl-1 pr-1">dbm</span>
        </template>
      </el-input>
    </el-form-item>
    <el-form-item label="增益模式">
      <el-select v-model="form.gainMode" type="number">
        <el-option
          v-for="item in incDecModeList"
          :key="item.value"
          :value="item.value"
          :label="item.label"
        />
      </el-select>
    </el-form-item>
    <el-form-item label="增益值">
      <el-input v-model="form.gainValue" type="number">
        <template #append>
          <span class="pl-1 pr-1">dbm</span>
        </template>
      </el-input>
    </el-form-item>
    <el-form-item label="驻留时间">
      <el-input v-model="form.stayTime" type="number">
        <template #append>
          <span class="pl-1 pr-1">ms</span>
        </template>
      </el-input>
    </el-form-item>
  </el-form>
</template>
<script setup>
const form = ref({
  measureMode: 0, // 测量模式
  polarType: 0, // 极化方式
  detectionMode: 0, // 检波方式
  detectionSpeed: 0, // 检波速度
  attenuationMode: 0, // 衰减模式
  attenuationValue: 0, // 衰减值
  gainMode: 0, // 增益模式
  gainValue: 0, // 增益值
  stayTime: 1000 // 驻留时间
})
const measureModeList = [
  { label: '低噪声', value: 0 },
  { label: '低失真', value: 1 },
  { label: '一般', value: 2 },
]
const polarizationModeList = [
  { label: '水平极化', value: 0 },
  { label: '垂直极化', value: 1 },
  { label: '右旋圆极化', value: 2 },
  { label: '左旋圆极化', value: 3 },
  { label: '右倾斜极化', value: 4 },
  { label: '左倾斜极化', value: 5 },
  { label: '双极化', value: 6 },
  { label: '混合极化', value: 7 },
  { label: '线极化', value: 8 },
  { label: '左旋椭圆极化', value: 9 },
  { label: '右旋椭圆极化', value: 10 },
]
const detectionModeList = ref([
  { label: '峰值', value: 0 },
  { label: '平均值', value: 1 },
  { label: '实时值', value: 2 },
  { label: '均方根', value: 3 },
  { label: '准峰值', value: 4 },
])
const incDecModeList = [
  { label: '关', value: 0 },
  { label: '人工衰减', value: 1 },
  { label: '自动衰减', value: 2 },
]
defineExpose({
  form
})
</script>
<style scoped>
.el-select {
  width: 100%;
}
</style>